﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProductList.ascx.cs" Inherits="MpSoft.Web.AdminCP.Controls.Product.ProductList" %>
<%@ Register Src="~/AdminCP/ToolsBar/Categories.ascx" TagPrefix="uc1" TagName="Categories" %>

<%--chosen--%>
<link rel="stylesheet" href="http://static.mpsoft.vn/Context/css/plugins/chosen/chosen.css">
<%--dataTables--%>
<script src="http://static.mpsoft.vn/Context/js/plugins/jquery-ui/jquery.ui.datepicker.min.js"></script>
<%-- dataTables --%>
<script src="http://static.mpsoft.vn/Context/js/plugins/datatable/jquery.dataTables.min.js"></script>
<script src="http://static.mpsoft.vn/Context/js/plugins/datatable/TableTools.min.js"></script>
<script src="http://static.mpsoft.vn/Context/js/plugins/datatable/ColReorderWithResize.js"></script>
<script src="http://static.mpsoft.vn/Context/js/plugins/datatable/ColVis.min.js"></script>
<script src="http://static.mpsoft.vn/Context/js/plugins/datatable/jquery.dataTables.columnFilter.js"></script>
<script src="http://static.mpsoft.vn/Context/js/plugins/datatable/jquery.dataTables.grouping.js"></script>
<%--  Chosen  --%>
<script src="http://static.mpsoft.vn/Context/js/plugins/chosen/chosen.jquery.min.js"></script>
<div class="row">
    <br />
    <div class="col-sm-9 category-select">
        <uc1:Categories runat="server" ID="Categories" />
    </div>
    <div class="col-sm-3 btn-form form-options">
        <a href="?mod=productedit" class="btn btn-green btn-large"><i class="glyphicon-circle_plus">&nbsp;</i> Thêm mới</a>
        <a id="cmdDelete" href="#" class="btn btn-large"><i class="glyphicon-circle_minus">&nbsp;</i> Xóa</a>
    </div>
</div>
<div class="row">
    <div class="col-sm-12">
        <div class="box box-color box-bordered green">
            <div class="box-title">
                <h3>
                    <i class="fa fa-table"></i>
                    Danh sách tin tức
                </h3>
            </div>
            <div class="box-content nopadding">
                <table class="table table-product table-bordered table-hover table-nomargin table-striped dataTable-1 usertable dataTable-reorder">
                    <thead>
                        <tr class='thefilter'>
                            <th><%--STT--%></th><th></th><th>Tiêu đề</th><th><%--Thứ tự--%></th><th>All</th><th><%--Còn hàng--%></th>
                            <th><%--Đã VAT--%></th><th><%--SP Mới--%></th>
                            <th><%--SP Hot--%></th><th><%--Bán chạy--%></th><th><%--SP KM--%></th><th><%--Options--%></th><th>CategoryID</th>
                        </tr>
                        <tr>
                            <th>STT</th>
                            <th>
                                <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="check_all" id="check_all"></th><th>Tiêu đề</th>
                            <th>Thứ tự</th><th>Kích Hoạt</th>
                            <th>Còn hàng</th><th>Đã VAT</th><th>SP Mới</th><th>SP Hot</th>
                            <th>Bán chạy</th><th>SP KM</th><th>Options</th><th>CategoryID</th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="rpList" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td><%# Container.ItemIndex + 1 %></td>
                                    <td>
                                        <input data-color="blue" data-skin="square" class="icheck-me" type="checkbox" name="check" value="<%# Eval("ProductID") %>"></td>
                                    <td><a href="?mod=productedit&itemid=<%# Eval("ProductID") %>"><%# Eval("ProductName") %></a></td>
                                    <td>
                                        <input type="text" name="order" class="tb-text" title="<%# Eval("ProductID") %>" value="<%# Eval("SortOrder") %>" /></td>
                                    <td class="tb-gen-1"><%# Eval("IsActive").ToString().Equals("True") ? "<span title='" + Eval("ProductID") + "' class='label label-satgreen' data-act='1' >Đã bật</span>" : "<span title='" +Eval("ProductID") + "' class='label label-lightred' data-act='0'>Chưa bật</span>" %></td>
                                    <td class="tb-gen-1">
                                        <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="exists" value="<%# Eval("ProductID") %>" <%# Eval("IsExist").ToString().Equals("True")?"checked":"" %> /></td>
                                    <td class="tb-gen-1">
                                        <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="vat" value="<%# Eval("ProductID") %>" <%# Eval("IsVAT").ToString().Equals("True")?"checked":"" %> /></td>
                                    <td class="tb-gen-1">
                                        <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="new" value="<%# Eval("ProductID") %>" <%# Eval("IsHome").ToString().Equals("True")?"checked":"" %> /></td>
                                    <td class="tb-gen-1">
                                        <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="hot" value="<%# Eval("ProductID") %>" <%# Eval("IsHot").ToString().Equals("True")?"checked":"" %> /></td>
                                    <td class="tb-gen-1">
                                        <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="sellgood" value="<%# Eval("ProductID") %>" <%# Eval("IsSellGood").ToString().Equals("True")?"checked":"" %> /></td>
                                    <td class="tb-gen-1">
                                        <input type="checkbox" data-color="blue" data-skin="square" class="icheck-me" name="promotion" value="<%# Eval("ProductID") %>" <%# Eval("IsPromotion").ToString().Equals("True")?"checked":"" %> /></td>
                                    <td class='hidden-480'>
                                        <a href='?mod=productedit&itemid=<%# Eval("ProductID") %>' class='btn' rel='tooltip' title='Sửa'><i class='fa fa-edit'></i></a>
                                        <a href='<%# Eval("ProductID") %>' class='btn Delete' rel='tooltip' title='Xóa'><i class='fa fa-times'></i></a>
                                    </td>
                                    <td><%# Eval("CategoryID") %></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        productBuss();
    });
</script>
